package Dao;

import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.List;

import org.junit.Before;
import org.junit.Test;

import Entity.MyExcellentCourse_student;

public class MyExcellentCourse_studentDaoTest {
	MyExcellentCourse_student mec =new MyExcellentCourse_student("20161946","20130001201906111","andriod","android教学进度表.docx","20130001","20190611",
			"这是android教学进度表。");
	MyExcellentCourse_studentDao mecd=new MyExcellentCourse_studentDao();
	List<MyExcellentCourse_student> meclist=new ArrayList<MyExcellentCourse_student>();

	@Before
	public void setUp() throws Exception {
	}

	@Test
	public void testAddMyExcellentCourse() {
		assertEquals(1,mecd.addMyExcellentCourse(mec));
	}

	@Test
	public void testDeleteCourseResourceByStudentNo() {
		assertEquals(1,mecd.deleteCourseResourceByStudentNo("20161944"));
	}

	@Test
	public void testQueryMyExcellentCourseByStudentNo() {
		meclist=mecd.queryMyExcellentCourseByStudentNo("20161946");
		for(int i=0;i<meclist.size();i++) {
		assertEquals("20161946",meclist.get(i).studentNo);
		}
	}

}


